Infinity-Set-User-Var names a function, with lambda list (D USER RECIPIENT/S):
Set “User Variables”
Lisp SET-USER-VAR = JSON setUserVar
{ "KEY": "VALUE" [ ... ] }{ d: "D-String" }
{ wtl: course: { COURSE }, facing: FACING }
{ d3: course: { COURSE } }
{ xpr: "expression" }
{ sN: "D-String" }
{ shotN: course: { COURSE }, facing: FACING }
This is a legacy-type method, which is provided for the convenience of client implementors.
{ d: "100~100~200~200~NE~6029604401000", s0: "100~100~300~300~NE~6029604401000", xpr: "smile" }
Historically, arbitrary attributes could be attached to a user in the game, as transient values that remained as long as that user was connected. Thus, any key:value pair could be “advertised” by a user by posting them to this method.
In Romance II, only the following “user variable” key names are actually supported:
See TOOTSVILLE INFINITY-WTL for a discussion of its structure.
This is a shot position in d form, where N is an arbitrary unique identifier chosen by the client. See TOOTSVILLE INFINITY-SHOOT for another way to provide this data.
This is a shot position in wtl form, where N is an arbitrary unique identifier chosen by the client.
Any other KEY value will result in an error.
When all keys are set successfully, this will return with a packet like
{ from: "setUserVar", status: true, set: [ "key", ... ] }
When some keys could not be set, they will be listed separately
{ from: "setUserVar", status: true, set: [ "key", ... ], unset: [ "key", ... ] }
When no key is from the set of supported keys, an error is returned:
{ from: "setUserVar", status: false, unset: [ "key", ... ] }
Defined in file src/infinity/legacy-commands.lisp.